package com.boomsecret.service;

import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.transport.TSocket;

/**
 * @author wangjinliang on 2019/1/30.
 */
public class ThriftDemo {
    public static void main(String[] args) throws Exception {
        TSocket transport = new TSocket("localhost",9999);
        TBinaryProtocol protocol = new TBinaryProtocol(transport);
        ITestService.Client client = new ITestService.Client(protocol);
        transport.open();
        String result = client.sayHello("jack");
        System.out.println(result);
        transport.close();
    }
}
